package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.geekidea.springbootplus.system.vo.SysProductQueryVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;


@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysProductAttribute对象", description = "商品属性")
public class SysProductAttribute extends BaseEntity {


    private static final long serialVersionUID = -8012190413864274554L;


    @ApiModelProperty("主键")
    @NotNull(message = "ID不能为空", groups = {Update.class})
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商品类型id")
    @NotNull(message = "商品类型id不能为空")
    private Integer categoryId;

    @ApiModelProperty("商品编号id")
    @NotNull(message = "商品编号id不能为空")
    private Integer productId;

    @ApiModelProperty("商品属性名")
    @NotNull(message = "商品属性名不能为空")
    private String attrName;

    @ApiModelProperty("商品属性值")
    @NotNull(message = "商品属性值不能为空")
    private String attrValue;


}
